<%--
  Created by IntelliJ IDEA.
  User: drophair
  Team: 深藏blow
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>激活码</title>
    <script src="/js/jquery-3.4.1.min.js"></script>
    <link rel="stylesheet" href="/css/bootstrap.min.css">
</head>
<body background="/img/bg.jpg">
<%
    String activecode = "";
    String error = "";
    Cookie[] cookies = request.getCookies();
    for (Cookie cookie : cookies) {
        if (cookie.getName().equals("a_code")) {
            activecode = cookie.getValue();
//            System.out.println("active-------------");
        }
    }
    error = request.getParameter("error");
%>
<form style="text-align: center" action="/ActiveCodeServlet" method="post">
    <%
        if (error != null && !error.equals("")) {%>
    <span><%=error%></span>
    <%}%>
    输入软件上的激活码:<input name="m_code">
    <input class="btn btn-info" type="submit" value="激活">
    <%
        if (activecode != null && !activecode.equals("")) {%>
    <h3>激活码</h3><span><%=activecode%></span>
    <%}%>
</form>
</body>
</html>
